(N/A) Consider an infinitely long thin straight wire with a uniform linear charge density $\lambda$.
By symmetry,the electric field $\vec{E}$ at any point $P$ at a radial distance $r$ from the wire must be directed radially outward (if $\lambda > 0$) or inward (if $\lambda < 0$).
To calculate the electric field,we choose a cylindrical Gaussian surface of radius $r$ and length $l$ coaxial with the wire.
The total electric flux $\phi_E$ through the Gaussian surface is given by Gauss's Law:
$\phi_E = \oint \vec{E} \cdot d\vec{A} = \frac{q_{enclosed}}{\epsilon_0}$
The flux through the two flat circular ends of the cylinder is zero because $\vec{E}$ is parallel to the surface area vector $d\vec{A}$ (i.e.,$\vec{E} \perp d\vec{A}$ is not true,rather $\vec{E}$ is perpendicular to the normal vector of the flat ends,so $\vec{E} \cdot d\vec{A} = 0$).
For the curved surface,$\vec{E}$ is everywhere perpendicular to the surface,so $\vec{E} \cdot d\vec{A} = E dA$.
Thus,$\phi_E = E \times (2 \pi r l)$.
The charge enclosed by the Gaussian surface is $q_{enclosed} = \lambda l$.
Applying Gauss's Law:
$E(2 \pi r l) = \frac{\lambda l}{\epsilon_0}$
Solving for $E$:
$E = \frac{\lambda}{2 \pi \epsilon_0 r}$